﻿capital = 91
set_research_slots = 6
2000.1.1 = {
	set_cosmetic_tag = SPR
	set_country_flag = dynamic_flag
	set_country_flag = dynamic_rebel_flag
	set_country_flag = generic_election_killswitch
	set_country_flag = SPR_initial_election_flag
	if = { limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "SPR_2000_naval_mtg"
		else = {
			set_naval_oob = "SPR_2000_naval_legacy"
		}
	}
	if = { limit = { has_dlc = "No Step Back" }
		set_oob = "SPR_2000_nsb"

		else = {
			set_oob = "SPR_2000_nonnsb"
		}
	}

	set_convoys = 150

	add_ideas = {
        #Economic Cycle
        stable_growth
        #Corruption
        medium_corruption
		#non faction effect
		medium_far_right_movement
        #Faction 1
        farmers
        #Faction 2
        labour_unions
        #Faction 3
        landowners

        #Bureacracy
        bureau_01
        #Military Spending
        defence_01
        #Internal Security
        police_04
        #Education budget
        edu_03
        #Health budget
        health_04
        #Social spending
        social_06

        #Trade Law
        consumption_economy
        #Conscription Law
        draft_army
        #Women in the military
        volunteer_women
        #Foreign Intervention Law
        intervention_limited_interventionism
        #Officer Training
        officer_international_education

		#special
		SPR_frequent_droughts_1
		SPR_deindustrialization
		SPR_idea_regional_autonomy
		SPR_idea_grey_market

        #Other
		christian
		EU_member
		NATO_member
		western_country
		multi_ethnic_state_idea
		the_euro

	}

	set_variable = { farmers_opinion = 40 }
	set_variable = { landowners_opinion = 60 }
	set_variable = { labour_unions_opinion = 65 }

	add_opinion_modifier = { target = ADO modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = ADO modifier = spanish_speaking }
	add_opinion_modifier = { target = EGU modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = EGU modifier = spanish_speaking }
	add_opinion_modifier = { target = MEX modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = MEX modifier = spanish_speaking }
	add_opinion_modifier = { target = COL modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = COL modifier = spanish_speaking }
	add_opinion_modifier = { target = ARG modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = ARG modifier = spanish_speaking }
	add_opinion_modifier = { target = PRU modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = PRU modifier = spanish_speaking }
	add_opinion_modifier = { target = VEN modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = VEN modifier = spanish_speaking }
	add_opinion_modifier = { target = CHL modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = CHL modifier = spanish_speaking }
	add_opinion_modifier = { target = ECU modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = ECU modifier = spanish_speaking }
	add_opinion_modifier = { target = GUA modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = GUA modifier = spanish_speaking }
	add_opinion_modifier = { target = BOL modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = BOL modifier = spanish_speaking }
	add_opinion_modifier = { target = DOM modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = DOM modifier = spanish_speaking }
	add_opinion_modifier = { target = HON modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = HON modifier = spanish_speaking }
	add_opinion_modifier = { target = PAR modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = PAR modifier = spanish_speaking }
	add_opinion_modifier = { target = ELS modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = ELS modifier = spanish_speaking }
	add_opinion_modifier = { target = NIC modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = NIC modifier = spanish_speaking }
	add_opinion_modifier = { target = COS modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = COS modifier = spanish_speaking }
	add_opinion_modifier = { target = CUB modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = CUB modifier = spanish_speaking }
	add_opinion_modifier = { target = PAN modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = PAN modifier = spanish_speaking }
	add_opinion_modifier = { target = URG modifier = spanish_speaking }
	reverse_add_opinion_modifier = { target = URG modifier = spanish_speaking }

	add_opinion_modifier = { target = BEL modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = BEL modifier = EU_member_opinion }
	add_opinion_modifier = { target = FRA modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = FRA modifier = EU_member_opinion }
	add_opinion_modifier = { target = GER modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = GER modifier = EU_member_opinion }
	add_opinion_modifier = { target = ITA modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = ITA modifier = EU_member_opinion }
	add_opinion_modifier = { target = LUX modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = LUX modifier = EU_member_opinion }
	add_opinion_modifier = { target = HOL modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = HOL modifier = EU_member_opinion }
	add_opinion_modifier = { target = DEN modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = DEN modifier = EU_member_opinion }
	add_opinion_modifier = { target = IRE modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = IRE modifier = EU_member_opinion }
	add_opinion_modifier = { target = GRE modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = GRE modifier = EU_member_opinion }
	add_opinion_modifier = { target = POR modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = POR modifier = EU_member_opinion }
	add_opinion_modifier = { target = AUS modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = AUS modifier = EU_member_opinion }
	add_opinion_modifier = { target = FIN modifier = EU_member_opinion }
	reverse_add_opinion_modifier = { target = FIN modifier = EU_member_opinion }

	add_opinion_modifier = { target = USA modifier = large_commercial_relations }
	reverse_add_opinion_modifier = { target = USA modifier = large_commercial_relations }
	add_opinion_modifier = { target = ITA modifier = historic_friends }
	reverse_add_opinion_modifier = { target = ITA modifier = historic_friends }
	add_opinion_modifier = { target = ADO modifier = historic_friends }
	reverse_add_opinion_modifier = { target = ADO modifier = historic_friends }
	add_opinion_modifier = { target = POR modifier = diplomatic_support }
	reverse_add_opinion_modifier = { target = POR modifier = diplomatic_support }
	add_opinion_modifier = { target = SOV modifier = trade_mission }
	reverse_add_opinion_modifier = { target = SOV modifier = trade_mission }

	#2000 NATO Relations
	add_opinion_modifier = { target = BEL modifier = NATO_member_modifier }
	reverse_add_opinion_modifier = { target = BEL modifier = NATO_member_modifier }
	add_opinion_modifier = { target = ITA modifier = NATO_member_modifier }
	reverse_add_opinion_modifier = { target = ITA modifier = NATO_member_modifier }

	give_guarantee = ADO #Spain and France are both responsible for Andorra's Defense

	#NATO military access
	diplomatic_relation = { country = BEL relation = military_access active = yes }
	diplomatic_relation = { country = CAN relation = military_access active = yes }
	diplomatic_relation = { country = CZE relation = military_access active = yes }
	diplomatic_relation = { country = DEN relation = military_access active = yes }
	diplomatic_relation = { country = FRA relation = military_access active = yes }
	diplomatic_relation = { country = GER relation = military_access active = yes }
	diplomatic_relation = { country = GRE relation = military_access active = yes }
	diplomatic_relation = { country = HUN relation = military_access active = yes }
	diplomatic_relation = { country = ICE relation = military_access active = yes }
	diplomatic_relation = { country = ITA relation = military_access active = yes }
	diplomatic_relation = { country = LUX relation = military_access active = yes }
	diplomatic_relation = { country = HOL relation = military_access active = yes }
	diplomatic_relation = { country = NOR relation = military_access active = yes }
	diplomatic_relation = { country = POL relation = military_access active = yes }
	diplomatic_relation = { country = POR relation = military_access active = yes }
	diplomatic_relation = { country = TUR relation = military_access active = yes }
	diplomatic_relation = { country = ENG relation = military_access active = yes }
	diplomatic_relation = { country = USA relation = military_access active = yes }

	set_technology = {
		integrated_transportation_system = 1
		post_conventional_rail = 1
		early_freight_locomotive = 1

		legacy_doctrines = 1
		combined_arms = 1

		infantry_weapons = 1
		infantry_weapons1 = 1
		infantry_weapons2 = 1
		infantry_weapons3 = 1
		support_weapons = 1
		support_weapons2 = 1
		support_weapons3 =1
		tandem_charge_warheads = 1
		squad_automatic_weapon = 1
		special_forces = 1
		special_forces2 = 1

		command_control_equipment = 1
		command_control_equipment1 = 1
		command_control_equipment2 = 1

		land_Drone_equipment = 1
		land_Drone_equipment1 = 1
		land_Drone_equipment2 = 1

		Anti_tank_0 = 1
		Anti_tank_1 = 1
		AT_upgrade_1 = 1

		Heavy_Anti_tank_0 = 1
		Heavy_Anti_tank_1 = 1

		Anti_Air_0 = 1
		Anti_Air_1 = 1
		AA_upgrade_1 = 1

		combat_eng_equipment = 1

		Early_APC = 1

		util_vehicle_0 = 1
		util_vehicle_1 = 1
		util_vehicle_2 = 1

		Rec_tank_0 = 1
		Rec_tank_1 = 1

		IFV_1 = 1
		IFV_2 = 1
		IFV_3 = 1
		IFV_4 = 1

		APC_1 = 1
		APC_2 = 1
		APC_3 = 1

		SP_arty_0 = 1

		artillery_0 = 1
		artillery_1 = 1
		Arty_upgrade_1 = 1
		artillery_2 = 1 #SBT 155/52 SIAC

		SP_Anti_Air_0 = 1
		SP_Anti_Air_1 = 1

		early_helicopter = 1
		transport_helicopter1 = 1
		attack_helicopter1 = 1

		early_fighter = 1
		MR_Fighter1 = 1

		AS_Fighter1 = 1

		MR_Fighter1 = 1

		L_Strike_fighter1 = 1

		Strike_fighter1 = 1

		early_bomber = 1
		naval_plane1 = 1
		naval_plane2 = 1
		naval_plane3 = 1

		transport_plane1 = 1
		transport_plane2 = 1
		transport_plane3 = 1

		landing_craft = 1

		night_vision_1 = 1
		night_vision_2 = 1
		night_vision_3 = 1

		body_armor_1980 = 1
		body_armor_2000 = 1
		camouflage = 1
		camouflage2 = 1

		basic_computing = 1
		integrated_circuit = 1
		computing1 = 1
		decryption1 = 1
		encryption1 = 1
		microprocessors = 1
		computing2 = 1
		decryption2 = 1
		encryption2 = 1

		radar = 1
		internet1 = 1 	#1G
		internet2 = 1
		gprs = 1
		fuel_silos = 1
	}
	if = {
		limit = { has_dlc = "No Step Back" }

		set_technology = {
			mbt_tech = 1
			tank_components_tech = 1
			tank_components_tech_2 = 1
			tank_components_tech_3 = 1
			small_medium_gun_tech = 1
			small_medium_gun_tech_2 = 1
			armor_tech = 1
			armor_tech_2 = 1
			armor_tech_3 = 1
			era_tech = 1
			diesel_engine_tech = 1
			diesel_engine_tech_2 = 1
			diesel_engine_tech_3 = 1
			diesel_engine_tech_4 = 1
		}
	}
	if = {
		limit = { NOT = { has_dlc = "No Step Back" } }

		set_technology = {
			MBT_1 = 1
			MBT_2 = 1
		}
	}
	if = {
		limit = {
			not = { has_dlc = "Man the Guns" }
		}
		set_technology = {
			modern_carrier_0 = 1
			modern_carrier_1 = 1
			modern_carrier_2 = 1

			corvette_1 = 1
			corvette_2 = 1

			LPD_0 = 1
			LPD_1 = 1

			frigate_1 = 1
			frigate_2 = 1

			submarine_1 = 1
			diesel_attack_submarine_1 = 1
			diesel_attack_submarine_2 = 1
		}
	}
	if = {
		limit = {
			has_dlc = "Man the Guns"
		}
		set_technology = {
			corvette_hull_1 = 1
			corvette_hull_2 = 1
			corvette_hull_3 = 1

			frigate_hull_1 = 1
			frigate_hull_2 = 1
			frigate_hull_3 = 1

			destroyer_hull_1 = 1
			destroyer_hull_2 = 1

			cruiser_hull_1 = 1
			tech_battleship_hull_1 = 1

			helicopter_operator_hull_1 = 1
			helicopter_operator_hull_2 = 1

			attack_submarine_hull_1 = 1
			attack_submarine_hull_2 = 1
			attack_submarine_hull_3 = 1

			missile_submarine_hull_1 = 1

			aircraft_carrier_engineering = 1
			aircraft_heli_engineering_1 = 1
			aircraft_heli_engineering_2 = 1

			tech_submarine_engineering = 1

			tech_naval_systems_engineering = 1
			tech_power_systems = 1
			tech_power_systems_1 = 1

			tech_combat_support_systems = 1
			tech_fire_control = 1
			tech_fire_control_1 = 1
			tech_combat_radar = 1
			tech_combat_radar_1 = 1
			tech_combat_radar_2 = 1
			tech_combat_sonar = 1
			tech_combat_sonar_1 = 1
			tech_combat_sonar_2 = 1

			tech_early_naval_weapon_systems = 1
			tech_naval_weapon_systems = 1
			tech_light_guns = 1
			tech_light_guns_1 = 1
			tech_127mm_guns = 1
			tech_127mm_guns_1 = 1

			tech_point_defense_system = 1
			tech_point_defense_system_1 = 1
			tech_point_defense_system_2 = 1
			tech_point_defense_system_3 = 1

			tech_missile_systems = 1
			tech_turret_missiles_surface = 1
			tech_turret_missiles_surface_1 = 1
			tech_turret_missiles_aa = 1
			tech_turret_missiles_aa_1 = 1
			tech_turret_missiles_aa_2 = 1
			tech_vls_surface = 1
			tech_vls_surface_1 = 1
			tech_vls_surface_2 = 1
			tech_vls_aa = 1
			tech_vls_aa_1 = 1
			tech_vls_aa_2 = 1

			tech_torpedoes = 1
			tech_torpedoes_1 = 1
			tech_torpedoes_2 = 1

			tech_mtg_landing_craft = 1
		}
	}
	#Influence system
	init_influence = yes
	set_variable = { domestic_influence_amount = 300 }
	add_to_array = { influence_array = FRA.id }
	add_to_array = { influence_array_val = 40 }
	add_to_array = { influence_array = ENG.id }
	add_to_array = { influence_array_val = 30 }
	add_to_array = { influence_array = ITA.id }
	add_to_array = { influence_array_val = 10 }
	add_to_array = { influence_array = USA.id }
	add_to_array = { influence_array_val = 10 }
	add_to_array = { influence_array = CHI.id }
	add_to_array = { influence_array_val = 2 }
	startup_influence = yes

	### Economy
	set_variable = { var = debt value = 828 }
	set_variable = { var = treasury value = 52 }
	set_variable = { var = corporate_tax_rate value = 35 }
	set_variable = { var = population_tax_rate value = 18 }
	set_variable = { var = int_investments value = 98 }

	# Spanish System
	add_to_array = { SPR_culture_opinion = 60 } # Catalonia = 0
	add_to_array = { SPR_culture_opinion = 35 } # Basque = 1
	add_to_array = { SPR_culture_opinion = 45 } # Galician = 2
	add_to_array = { SPR_culture_opinion = 70 } # Andaluces = 3
	add_to_array = { SPR_culture_opinion = 65 } # Canaries = 4
	SPR_init_state_dynamic_modifiers = yes

	set_popularities = {
		democratic = 62.0
		communism = 15.0
		fascism = 0.0
		neutrality = 19.0
		nationalist = 4.0
	}
	set_politics = {
		ruling_party = democratic
		last_election = "1996.3.1"
		election_frequency = 48
		elections_allowed = yes
	}

	### Election Threshold
	set_variable = { election_threshold = 0.03 }
	start_politics_input = yes
	### Party Popularities
	set_variable = { party_pop_array^0 = 0 } #Western_Autocracy
	set_variable = { party_pop_array^1 = 0.35 } #conservatism
	set_variable = { party_pop_array^2 = 0 } #liberalism
	set_variable = { party_pop_array^3 = 0.27 } #socialism
	set_variable = { party_pop_array^4 = 0.03 } #Communist-State
	set_variable = { party_pop_array^5 = 0.12 } #anarchist_communism
	set_variable = { party_pop_array^6 = 0 } #Conservative
	set_variable = { party_pop_array^7 = 0 } #Autocracy
	set_variable = { party_pop_array^8 = 0 } #Mod_Vilayat_e_Faqih
	set_variable = { party_pop_array^9 = 0 } #Vilayat_e_Faqih
	set_variable = { party_pop_array^10 = 0 } #Kingdom
	set_variable = { party_pop_array^11 = 0 } #Caliphate
	set_variable = { party_pop_array^12 = 0.01 } #Neutral_Muslim_Brotherhood
	set_variable = { party_pop_array^13 = 0 } #Neutral_Autocracy
	set_variable = { party_pop_array^14 = 0 } #Neutral_conservatism
	set_variable = { party_pop_array^15 = 0 } #oligarchism
	set_variable = { party_pop_array^16 = 0.06 } #Neutral_Libertarian
	set_variable = { party_pop_array^17 = 0.05 } #Neutral_green
	set_variable = { party_pop_array^18 = 0.07 } #neutral_Social
	set_variable = { party_pop_array^19 = 0 } #Neutral_Communism
	set_variable = { party_pop_array^20 = 0.04 } #Nat_Populism
	set_variable = { party_pop_array^21 = 0 } #Nat_Fascism
	set_variable = { party_pop_array^22 = 0 } #Nat_Autocracy
	set_variable = { party_pop_array^23 = 0 } #Monarchist

	### Ruling Party
	add_to_array = { ruling_party = 1 }
	startup_politics = yes

	create_country_leader = {
		name = "José María Aznar"
		picture = "jose_maria_aznar.dds"
		ideology = conservatism
		traits = {
			western_conservatism
		}
	}

	recruit_character = SPR_alfonso_pardo_de_santayana_y_coloma
	recruit_character = SPR_jaime_dominguez_buj
	recruit_character = SPR_jose_julio_rodriguez_fernandez
	recruit_character = SPR_fernando_gutierrez_diaz_de_otazu
	recruit_character = SPR_pedro_pitarch_bartolome
	recruit_character = SPR_antonio_planells
	recruit_character = SPR_antonio_martorell_lacave
	recruit_character = SPR_fernando_garcia_sanchez
	recruit_character = SPR_francisco_jose_cortes_uria
	recruit_character = SPR_francisco_jose_garcia_vega
	recruit_character = SPR_jose_jimenez_ruiz

	if = {
		limit = {
			not = { has_dlc = "Man the Guns" }
		}
		create_equipment_variant = {
			name = "Príncipe de Asturias"
			type = carrier_2
			upgrades = {
			}
		}
	}

	############################################
	#Starting Production Licenses
	############################################

	if = {
		limit = { has_dlc = "Death or Dishonor" }
		if = { limit = { NOT = { has_dlc = "No Step Back" } }
			GER = {
				create_production_license = {
					target = SPR
					equipment = {
						type = MBT_3
					}
					cost_factor = 0
				}
			}
			FRA = {
				create_production_license = {
					target = SPR
					equipment = {
						type = MBT_2
					}
					cost_factor = 0
				}
			}
		}
	}
	#############################################
	#MTG Variants
	#############
	if = {
		limit = { has_dlc = "Man the Guns" }

		#Príncipe de Asturias Class
		create_equipment_variant = {
			name = "Príncipe de Asturias Class"
			type = helicopter_operator_hull_1
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_radar_1
				fixed_ship_auxillary_slot_3 = module_fuel_tank
				fixed_ship_auxillary_slot_2 = module_ciws_1
				fixed_ship_auxillary_slot = module_chain_gun
				fixed_ship_battery_slot = module_light_flight_deck_3
				front_1_custom_slot = module_ciws_1
				mid_1_custom_slot = module_helipads_1
				rear_1_custom_slot = module_ciws_1
			}
		}
		#Galicia Class
		create_equipment_variant = {
			name = "Galicia Class"
			type = helicopter_operator_hull_2
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_digital_integrated_fire_control
				fixed_ship_radar_slot = module_radar_3
				fixed_ship_auxillary_slot_3 = module_fuel_tank
				fixed_ship_auxillary_slot_2 = module_chain_gun
				fixed_ship_auxillary_slot = module_chain_gun
				fixed_ship_battery_slot = module_light_flight_deck_1
				front_1_custom_slot = module_helipads_1
				mid_1_custom_slot = module_fuel_tank
				rear_1_custom_slot = module_helipads_1
			}
		}
		#Rio Damuji Class
		create_equipment_variant = {
			name = "Rio Damuji Class"
			type = frigate_hull_2
			name_group = SPR_DD_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_sonar_2
				fixed_ship_auxillary_slot_2 = empty
				fixed_ship_auxillary_slot_1 = empty
				fixed_ship_auxillary_slot = module_fuel_tank
				fixed_ship_battery_slot = module_127mm_battery
				front_1_custom_slot = module_chain_gun
				rear_1_custom_slot = module_light_helipad_1

			}
			obsolete = yes
		}
		#Santa María Class
		create_equipment_variant = {
			name = "Santa María Class - Batch #1"
			type = frigate_hull_2
			#name_group = SPAIN
			parent_version = 1
			modules = {
				fixed_ship_engine_slot = module_light_surface_jet_turbine_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_sonar_2
				fixed_ship_auxillary_slot_2 = module_aa_missiles_2
				fixed_ship_auxillary_slot_1 = module_torpedoes_2
				fixed_ship_auxillary_slot = module_fuel_tank
				fixed_ship_battery_slot = module_127mm_battery
				front_1_custom_slot = module_ciws_2
				rear_1_custom_slot = module_light_helipad_1

			}
		}
		#Santa María Class
		create_equipment_variant = {
			name = "Santa María Class - Batch #2"
			type = frigate_hull_2
			#name_group = SPAIN
			parent_version = 2
			modules = {
				fixed_ship_engine_slot = module_light_surface_jet_turbine_power
				fixed_ship_fire_control_system_slot = module_digital_integrated_fire_control
				fixed_ship_radar_slot = module_sonar_3
				fixed_ship_auxillary_slot_2 = module_anti_submarine_mortar
				fixed_ship_auxillary_slot_1 = module_torpedoes_2
				fixed_ship_auxillary_slot = module_fuel_tank
				fixed_ship_battery_slot = module_127mm_battery
				front_1_custom_slot = module_ciws_3
				rear_1_custom_slot = module_light_helipad_1

			}
		}
		#Baleares Class
		create_equipment_variant = {
			name = "Baleares Class"
			type = frigate_hull_1
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_jet_turbine_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_sonar_1
				fixed_ship_auxillary_slot_2 = module_aa_missiles_1
				fixed_ship_auxillary_slot_1 = module_torpedoes_1
				fixed_ship_auxillary_slot = module_anti_submarine_missile_1
				fixed_ship_battery_slot = module_76mm_battery
				front_1_custom_slot = module_asm_1
				rear_1_custom_slot = module_fuel_tank

			}
		}

		#Delfín Class
		create_equipment_variant = {
			name = "Delfín Class"
			type = attack_submarine_hull_1
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_sub_diesel_electric_power
				fixed_ship_radar_slot = module_sonar_1
				fixed_ship_auxillary_slot_3 = module_torpedoes_1
				fixed_ship_auxillary_slot_2 = module_sub_esm_1
				fixed_ship_auxillary_slot_1 = module_fuel_tank
				fixed_ship_auxillary_slot = module_torpedoes_1
				fixed_ship_battery_slot = module_anti_ship_torpedoes_1

			}
		}
		#Agosta Class
		create_equipment_variant = {
			name = "Agosta Class"
			type = attack_submarine_hull_2
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_sub_diesel_electric_power
				fixed_ship_radar_slot = module_sonar_2
				fixed_ship_auxillary_slot_3 = module_torpedoes_2
				fixed_ship_auxillary_slot_2 = module_sub_esm_1
				fixed_ship_auxillary_slot_1 = module_torpedoes_2
				fixed_ship_auxillary_slot = module_vls_sub_asm_1
				fixed_ship_battery_slot = module_anti_ship_torpedoes_2

			}
		}
		#Descubierta Class
		create_equipment_variant = {
			name = "Descubierta Class - Surface Warfare Batch"
			type = corvette_hull_2
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_radar_2
				fixed_ship_auxillary_slot = module_aa_missiles_2
				fixed_ship_battery_slot = module_76mm_gun_2
				front_1_custom_slot = module_asm_2
				rear_1_custom_slot = module_torpedoes_2

			}
		}
		#Descubierta Class
		create_equipment_variant = {
			name = "Descubierta Class - Anti-Submarine Batch"
			type = corvette_hull_2
			#name_group = SPAIN
			parent_version = 1
			modules = {
				fixed_ship_engine_slot = module_light_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_radar_2
				fixed_ship_auxillary_slot = module_torpedoes_2
				fixed_ship_battery_slot = module_76mm_gun_2
				front_1_custom_slot = module_aa_missiles_2
				rear_1_custom_slot = module_anti_submarine_mortar

			}
		}
		#Segura Class - Mine Countermeasures
		create_equipment_variant = {
			name = "Segura Class"
			type = corvette_hull_2
			#name_group = SPR_MODERN_CORVETTE_NAMES
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_radar_2
				fixed_ship_auxillary_slot = module_mineclearing
				fixed_ship_battery_slot = module_76mm_gun_2
				front_1_custom_slot = module_chain_gun
				rear_1_custom_slot = module_anti_submarine_mortar

			}
		}
		#Chilreu Class
		#Descubierta Class
		create_equipment_variant = {
			name = "Chilreu Patrol Class"
			type = corvette_hull_1
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_analog_fire_control
				fixed_ship_radar_slot = module_radar_1
				fixed_ship_auxillary_slot = module_chain_gun
				fixed_ship_battery_slot = module_76mm_gun_2
				front_1_custom_slot = module_chain_gun
				rear_1_custom_slot = module_chain_gun

			}
		}
		#Serviola Class
		create_equipment_variant = {
			name = "Serviola Patrol Class"
			type = corvette_hull_3
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_digital_integrated_fire_control
				fixed_ship_radar_slot = module_radar_3
				fixed_ship_auxillary_slot = module_chain_gun
				fixed_ship_battery_slot = module_76mm_gun_3
				front_1_custom_slot = module_chain_gun
				rear_1_custom_slot = module_light_helipad_1

			}
		}

	}
	#############################################
}

2017.1.1 = {
	oob = "SPR_2017"
	clr_country_flag = generic_election_killswitch
	clr_country_flag = SPR_initial_election_flag

	if = { limit = { has_dlc = "No Step Back" }
		set_oob = "SPR_2017_nsb"
		else = {
			set_oob = "SPR_2017_nonnsb"
		}
	}
	if = { limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "SPR_2017_naval_mtg"
		else = {
			set_naval_oob = "SPR_2017_naval_legacy"
		}
	}

	add_ideas = {
		#pop_050
		widespread_corruption

		christian
		EU_member
		stable_growth
		defence_01
		edu_03
		health_04
		social_06
		bureau_03
		police_04
		volunteer_army
		volunteer_women
		intervention_limited_interventionism
		NATO_member
		western_country
		medium_far_right_movement
		small_medium_business_owners
		labour_unions
		landowners
		#civil_law
		#tax_cost_34
		multi_ethnic_state_idea
	}

	# Political Parties
	set_country_flag = SPR_vox_forms
	set_country_flag = SPR_cidudanos_forms
	set_country_flag = SPR_death_of_charles_hugo
	set_country_flag = SPR_abdication_of_juan_carlos

	# Internal Factions
	set_variable = { small_medium_business_owners = 75 }
	set_variable = { landowners_opinion = 60 }

	add_opinion_modifier = { target = SOV modifier = minor_sanctions }
	set_country_flag = sanctions_against_SOV_flag

	set_country_flag = military_advisors_IRQ
	IRQ = { add_to_variable = { foreign_advisors = 1 } }
	set_country_flag = military_advisors_MAL
	MAL = { add_to_variable = { foreign_advisors = 1 } }

	#NATO military access
	diplomatic_relation = {
		country = ALB
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = BEL
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = BUL
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = CAN
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = CRO
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = CZE
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = DEN
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = EST
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = FRA
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = GER
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = GRE
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = HUN
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = ICE
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = ITA
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = LAT
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = LIT
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = LUX
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = HOL
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = NOR
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = POL
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = POR
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = ROM
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = SLO
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = SLV
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = TUR
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = ENG
		relation = military_access
		active = yes
	}
	diplomatic_relation = {
		country = USA
		relation = military_access
		active = yes
	}

	#Nat focus


	set_technology = {

		util_vehicle_2 = 1
		util_vehicle_3 = 1

		Rec_tank_2 = 1

		body_armor_2010 = 1

		computing3 = 1
		decryption3 = 1
		encryption3 = 1
		computing4 = 1
		decryption4 = 1
		encryption4 = 1
		neural_networks_revival = 1
		data_mining = 1
		industrial_electrospun_polymeric_nanofibers = 1
		stereolitography = 1
		DNA_fingerprinting = 1
		modern_gmo = 1
		gene_therapy = 1

		wifi = 1
		internet3 = 1	#3G
		edge = 1
		umts = 1
		hsupa = 1
		internet4 = 1	#4G
		lte = 1

		construction1 = 1
		construction2 = 1
		excavation1 = 1
		excavation2 = 1
	}
	if = {
		limit = { has_dlc = "No Step Back" }

		set_technology = {
			mbt_tech_1 = 1
			tank_components_tech_2 = 1
			tank_components_tech_3 = 1
			small_medium_gun_tech = 1
			small_medium_gun_tech_2 = 1
			medium_gun_tech_2 = 1
			armor_tech_2 = 1
			armor_tech_3 = 1
			era_tech_2 = 1
			diesel_engine_tech_3 = 1
			diesel_engine_tech_4 = 1
			turbine_engine_tech_2 = 1
		}
	}
	if = {
		limit = { NOT = { has_dlc = "No Step Back" } }

		set_technology = {
			MBT_3 = 1
			MBT_4 = 1
		}
	}
	if = {
		limit = {
			not = { has_dlc = "Man the Guns" }
		}
		set_technology = {
			missile_frigate_1 = 1
			missile_frigate_2 = 1
			missile_frigate_3 = 1
		}
	}
	if = {
		limit = {
			has_dlc = "Man the Guns"
		}
		set_technology = {
			corvette_hull_1 = 1
			corvette_hull_2 = 1
			corvette_hull_3 = 1
			corvette_hull_4 = 1

			frigate_hull_1 = 1
			frigate_hull_2 = 1
			frigate_hull_3 = 1
			frigate_hull_4 = 1

			destroyer_hull_1 = 1
			destroyer_hull_2 = 1

			cruiser_hull_1 = 1
			tech_battleship_hull_1 = 1

			helicopter_operator_hull_1 = 1
			helicopter_operator_hull_2 = 1

			attack_submarine_hull_1 = 1
			attack_submarine_hull_2 = 1
			attack_submarine_hull_3 = 1
			attack_submarine_hull_4 = 1

			missile_submarine_hull_1 = 1
			missile_submarine_hull_2 = 1

			aircraft_carrier_engineering = 1
			aircraft_heli_engineering_1 = 1
			aircraft_heli_engineering_2 = 1
			aircraft_heli_engineering_3 = 1

			tech_submarine_engineering = 1
			tech_submarine_engineering_1 = 1
			tech_submarine_engineering_2 = 1
			tech_submarine_engineering_3 = 1
			tech_submarine_engineering_4 = 1

			tech_naval_systems_engineering = 1
			tech_power_systems = 1
			tech_power_systems_1 = 1
			tech_power_systems_2 = 1
			tech_nuclear_power_systems = 1
			tech_nuclear_power_systems_1 = 1
			tech_nuclear_power_systems_2 = 1

			tech_combat_support_systems = 1
			tech_fire_control = 1
			tech_fire_control_1 = 1
			tech_fire_control_2 = 1
			tech_combat_radar = 1
			tech_combat_radar_1 = 1
			tech_combat_radar_2 = 1
			tech_combat_radar_3 = 1
			tech_combat_sonar = 1
			tech_combat_sonar_1 = 1
			tech_combat_sonar_2 = 1
			tech_combat_sonar_3 = 1

			tech_naval_weapon_systems = 1
			tech_light_guns = 1
			tech_light_guns_1 = 1
			tech_light_guns_2 = 1
			tech_127mm_guns = 1
			tech_127mm_guns_1 = 1

			tech_point_defense_system = 1
			tech_point_defense_system_1 = 1
			tech_point_defense_system_2 = 1
			tech_point_defense_system_3 = 1
			tech_point_defense_system_4 = 1

			tech_missile_systems = 1
			tech_turret_missiles_surface = 1
			tech_turret_missiles_surface_1 = 1
			tech_turret_missiles_surface_2 = 1
			tech_turret_missiles_surface_3 = 1

			tech_turret_missiles_aa = 1
			tech_turret_missiles_aa_1 = 1
			tech_turret_missiles_aa_2 = 1
			tech_turret_missiles_aa_3 = 1

			tech_vls_surface = 1
			tech_vls_surface_1 = 1
			tech_vls_surface_2 = 1
			tech_vls_surface_3 = 1

			tech_vls_aa = 1
			tech_vls_aa_1 = 1
			tech_vls_aa_2 = 1
			tech_vls_aa_3 = 1

			tech_torpedoes = 1
			tech_torpedoes_1 = 1
			tech_torpedoes_2 = 1
			tech_torpedoes_3 = 1
			tech_torpedoes_4 = 1

			tech_mtg_landing_craft = 1
		}
	}
	### Economy
	set_variable = { var = debt value = 1552 }
	set_variable = { var = int_investments value = 772 }
	set_variable = { var = treasury value = 63 }
	set_variable = { var = corporate_tax_rate value = 25 }
	set_variable = { var = population_tax_rate value = 20 }


	set_popularities = {
		democratic = 68.0
		communism = 0.0
		fascism = 0.0
		neutrality = 32.0
		nationalist = 0.0
	}
	set_politics = {

		ruling_party = democratic
		last_election = "2016.6.26"
		election_frequency = 48
		elections_allowed = yes
	}

	start_politics_input = yes

	### Party Popularities
	set_variable = { party_pop_array^0 = 0 } #Western_Autocracy
	set_variable = { party_pop_array^1 = 0.33 } #conservatism
	set_variable = { party_pop_array^2 = 0.13 } #liberalism
	set_variable = { party_pop_array^3 = 0.22 } #socialism
	set_variable = { party_pop_array^4 = 0 } #Communist-State
	set_variable = { party_pop_array^5 = 0 } #anarchist_communism
	set_variable = { party_pop_array^6 = 0 } #Conservative
	set_variable = { party_pop_array^7 = 0 } #Autocracy
	set_variable = { party_pop_array^8 = 0 } #Mod_Vilayat_e_Faqih
	set_variable = { party_pop_array^9 = 0 } #Vilayat_e_Faqih
	set_variable = { party_pop_array^10 = 0 } #Kingdom
	set_variable = { party_pop_array^11 = 0 } #Caliphate
	set_variable = { party_pop_array^12 = 0 } #Neutral_Muslim_Brotherhood
	set_variable = { party_pop_array^13 = 0 } #Neutral_Autocracy
	set_variable = { party_pop_array^14 = 0.18 } #Neutral_conservatism
	set_variable = { party_pop_array^15 = 0 } #oligarchism
	set_variable = { party_pop_array^16 = 0 } #Neutral_Libertarian
	set_variable = { party_pop_array^17 = 0 } #Neutral_green
	set_variable = { party_pop_array^18 = 0.14 } #neutral_Social
	set_variable = { party_pop_array^19 = 0 } #Neutral_Communism
	set_variable = { party_pop_array^20 = 0 } #Nat_Populism
	set_variable = { party_pop_array^21 = 0 } #Nat_Fascism
	set_variable = { party_pop_array^22 = 0 } #Nat_Autocracy
	set_variable = { party_pop_array^23 = 0 } #Monarchist

	### Ruling Party
	add_to_array = { ruling_party = 1 }

	startup_politics = yes

	create_country_leader = {
		name = "Mariano Rajoy"
		picture = "mariano_rajoy.dds"
		ideology = conservatism
		traits = {
			western_conservatism
		}

	}

	recruit_character = SPR_francisco_javier_garcia_arnaiz
	recruit_character = SPR_javier_salto_martinez
	recruit_character = SPR_venancio_aguado_de_diego

	if = {
		limit = {
			not = { has_dlc = "Man the Guns" }
		}
		create_equipment_variant = {
			name = "Alvaro de Bazan-class"
			type = missile_frigate_3
			upgrades = {
			}
		}

		create_equipment_variant = {
			name = "Fridtjof Nansen-Class"
			type = missile_frigate_3
			upgrades = {
			}
		}
	}
	#############################################
	#MTG Variants
	#############
	if = {
		limit = { has_dlc = "Man the Guns" }

		#Alvaro de Bazan Class
		create_equipment_variant = {
			name = "Alvaro de Bazan Class"
			type = frigate_hull_3
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_jet_turbine_power2
				fixed_ship_fire_control_system_slot = module_digital_integrated_fire_control
				fixed_ship_radar_slot = module_radar_4
				fixed_ship_auxillary_slot_2 = module_vls_asm_2
				fixed_ship_auxillary_slot_1 = module_vls_sam_3
				fixed_ship_auxillary_slot = module_ciws_4
				fixed_ship_battery_slot = module_76mm_gun_1
				front_1_custom_slot = module_torpedoes_4
				rear_1_custom_slot = module_light_helipad_2

			}
		}

		#Juan Carlos I Class
		create_equipment_variant = {
			name = "Juan Carlos I Class"
			type = helicopter_operator_hull_2
			#name_group = SPAIN
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_digital_integrated_fire_control
				fixed_ship_radar_slot = module_radar_3
				fixed_ship_auxillary_slot_3 = module_fuel_tank
				fixed_ship_auxillary_slot_2 = module_chain_gun
				fixed_ship_auxillary_slot = module_esm_1
				fixed_ship_battery_slot = module_light_flight_deck_7
				front_1_custom_slot = module_chain_gun
				mid_1_custom_slot = module_chain_gun
				rear_1_custom_slot = module_chain_gun
			}
		}

		#Isaac Peral Class
		create_equipment_variant = {
			name = "Isaac Peral Class"
			type = attack_submarine_hull_4
			name_group = SPR_SS_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_sub_diesel_electric_power3
				fixed_ship_radar_slot = module_sonar_4
				fixed_ship_auxillary_slot_3 = module_torpedoes_3
				fixed_ship_auxillary_slot_2 = module_sub_esm_2
				fixed_ship_auxillary_slot_1 = module_torpedoes_3
				fixed_ship_auxillary_slot = module_minelaying
				fixed_ship_battery_slot = module_anti_ship_torpedoes_3

			}
		}

		#Meteoro Class https://en.wikipedia.org/wiki/Meteoro-class_offshore_patrol_vessel
		create_equipment_variant = {
			name = "Meteoro Patrol Class"
			type = corvette_hull_3
			#name_group = SPR_DD_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_engine_slot = module_light_surface_diesel_power
				fixed_ship_fire_control_system_slot = module_advanced_integrated_missile_radar_control
				fixed_ship_radar_slot = module_radar_4
				fixed_ship_auxillary_slot = module_chain_gun
				fixed_ship_battery_slot = module_76mm_gun_3
				front_1_custom_slot = module_chain_gun
				rear_1_custom_slot = module_light_helipad_1
			}
		}

	}
	#############################################
}